﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="mtFctr_View.aspx.vb" Inherits="mtFctr_View" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %>

<%@ Register Assembly="ISNet.WebUI.WebTreeView" Namespace="ISNet.WebUI.WebTreeView" TagPrefix="ISWebTreeView" %>

<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>

<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>

<%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop" TagPrefix="ISWebDesktop" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="script/style.css" rel="stylesheet" />
    <script src="script/tinybox.js"></script>
    <div style="float: left; width: 97%; border: solid; border-color: gray; border-width: 1px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; text-align: right; padding: 5px 5px 5px 5px;">
        <div style="text-align: right; margin-top: 5px;">
            <div align="left" style="width: 600px; float: left">
                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            </div>

            <div style="float: right;">

                <table>
                    <tr>

                        <td>Root Fund Center </td>
                        <td>
                            <ISWebCombo:WebCombo ID="fctrWebCombo" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="FundCenterCode" Height="20px" Width="350px" DataSourceID="fctrObjectDataSource" AdditionalSearchFields="FundCenterCode" AllowWildCardSearch="true">
                                <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" EntryMode="AutoComplete" ComboMode="MultipleColumns">
                                    <ClientSideEvents />
                                </LayoutSettings>
                                <Columns>
                                    <ISWebCombo:WebComboColumn BaseFieldName="Description" Name="Description" HeaderText="ชื่อ FundCenter" Width="250px" />
                                    <ISWebCombo:WebComboColumn BaseFieldName="FundCenterCode" Name="FundCenterCode" HeaderText="รหัส FundCenter" Width="100px" />
                                </Columns>
                            </ISWebCombo:WebCombo>
                            <asp:ObjectDataSource ID="fctrObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByPlanYear" TypeName="MasterDataSetTableAdapters.FundCentersTableAdapter">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="PlanYearsTxt" Name="PlanYear" PropertyName="Text" Type="Int16" />
                                </SelectParameters>

                            </asp:ObjectDataSource>
                        </td>
                        <td>user name</td>
                        <td>
                            <ISWebCombo:WebCombo ID="UserFC" runat="server" UseDefaultStyle="True" DataTextField="FullName" DataValueField="UserName" Height="20px" Width="280px" AdditionalSearchFields="UserName" AllowWildCardSearch="true" OnInitializeDataSource="UserFC_InitializeDataSource">
                                <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" EntryMode="AutoComplete" ComboMode="MultipleColumns">
                                    <ClientSideEvents />
                                </LayoutSettings>
                                <Columns>
                                    <ISWebCombo:WebComboColumn BaseFieldName="FullName" Name="FullName" HeaderText="ชื่อ UserName" Width="200px" />
                                    <ISWebCombo:WebComboColumn BaseFieldName="UserName" Name="UserName" HeaderText="รหัส" Width="80px" />
                                </Columns>
                            </ISWebCombo:WebCombo>

                        </td>
                        <td>ปี&nbsp;</td>
                        <td>
                            <asp:TextBox ID="PlanYearsTxt" runat="server" Width="50px" Enabled="false" Style="text-align: center;"></asp:TextBox></td>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="SearhBtn" runat="server" ImageUrl="Icons/search.jpg" ToolTip="แสดงโครงสร้าง FundCenterCode Item ตามเงื่อนไขที่ระบุ" />

                        </td>
                    </tr>
                </table>

            </div>
        </div>
    </div>

    <asp:ScriptManager ID="Scriptmanager1" runat="server">
    </asp:ScriptManager>

    <div style="float: left; width: 100%">
        <table width="100%">
            <tr>
                <td align="center">
                    <ISWebGrid:WebGrid ID="WebGrid1" runat="server" UseDefaultStyle="True" Width="730px" DefaultStyleMode="Silver" Height="500px" OnInitializePostBack="WebGrid1_InitializePostBack" OnInitializeRow="WebGrid1_InitializeRow">
                        <LayoutSettings>
                            <RowStyle Font-Names="Tahoma" Font-Size="9" CustomRules="overflow: hidden;" />

                        </LayoutSettings>
                        <RootTable DataKeyField="id">
                            <SelfReferencingSettings ChildDataMember="ParentCode" Enabled="True" ExpandColumnMember="Description"
                                ParentDataMember="id" />
                            <Columns>
                                <ISWebGrid:WebGridColumn Name="Description" Width="600px" Caption="Name" DataMember="Description">
                                    <HeaderStyle HorizontalAlign="Center" Width="600px" />
                                    <CellStyle HorizontalAlign="Left" />

                                </ISWebGrid:WebGridColumn>

                                <%--  <ISWebGrid:WebGridColumn Name="Action" Width="100px" Caption=" " DataMember="" ColumnType="Template">
                                    <CellTemplate>

                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Icons/ic_new.png" OnClientClick="addclick(); return false;" ToolTip="เพิ่ม Commitment Item ใต้ลำดับ" />
                                        <asp:ImageButton ID="delete_btn" runat="server" ImageUrl="~/Icons/ic_delete.png" OnClientClick="CustomRequest(); return false" ToolTip="ลบCommitment Item ใต้ลำดับ" />

                                    </CellTemplate>
                                    <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                    <CellStyle HorizontalAlign="Right" />
                                </ISWebGrid:WebGridColumn>--%>
                            </Columns>
                        </RootTable>

                    </ISWebGrid:WebGrid>

                </td>
            </tr>
        </table>
        <%=AlertText%>
    </div>
    <script>
        <%=ScriptText%>


        // function SetFilter() {
        //     var CmmtGroup
        // CmmtGroup = document.getElementById('').value
        //    var WebCombo1 = ISGetObject("WebCombo1");
        //    WebCombo1.ClearAdditionalFilters();
        //    WebCombo1.SetAdditionalFilters("[CmmtGroup] = '" + CmmtGroup + "'");
        //  }
    </script>
</asp:Content>

